﻿using Basic.Cluster.Manager;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;

namespace Basic.Cluster.Abstract;

/// <summary>
/// 服务注册器
/// </summary>
public interface IRegister
{
    /// <summary>
    /// 添加服务注册
    /// </summary>
    /// <param name="services"></param>
    /// <param name="config"></param>
    /// <returns></returns>
    IServiceCollection AddRegister(IServiceCollection services, ClusterConfig config);

    /// <summary>
    /// 启动服务注册
    /// </summary>
    /// <param name="app"></param>
    /// <returns></returns>
    IApplicationBuilder UseRegister(IApplicationBuilder app);

}